package cn.credit.loan.dao.purpose;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.credit.loan.entity.Purpose;

/**
 * 贷款用途类型类Dao层---Mapper接口
 * @author LI
 *
 */
public interface PurposeMapper {
	/**
	 * 查看所有的贷款用途类型信息列表
	 * @return
	 */
	public List<Purpose> getPurpose()throws Exception;
	
	/**
	 * 根据ID编号   或者   贷款类型，获取贷款用途信息
	 * @param purposeId
	 * @param purposeName
	 * @return
	 */
	public Purpose getByPurpose(@Param("purposeId")Integer purposeId,
			   	 				@Param("purposeName")String purposeName)throws Exception;
	
	/**
	 * 添加贷款用途类型
	 * @param purpose
	 * @return
	 */
	public int addPurpose(Purpose purpose)throws Exception;
	
}
